"""
运行整个项目的入口文件
"""
import pytest
import time

def run_all_cases():
    current_day = time.strftime("%Y_%m_%d_%H_%M_%S")  # 设置当前的时间
    pytest.main(['testcases', '-v', '-s', '--junit-xml=reports/report.xml','--alluredir=reports/allure-report',  f'--html=reports/report_{current_day}.html'])


def run_case():
    # https://docs.python.org/zh-cn/3/library/time.html#time.strftime
    current_day = time.strftime("%Y_%m_%d_%H_%M_%S")  # 设置当前的时间
    pytest.main(['testcases', '-v','-s', '-m tmp', f'--html=reports/report_{current_day}.html'])


if __name__ == '__main__':
    run_all_cases()
